package com.dxt.springmvcdemo.config;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInterceptor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;

import java.util.Properties;

/**
 * BelongProject: springMVC
 * BelongPackage: com.dxt.springmvcdemo.config
 * Description:
 *
 * @Author 段鑫涛
 * @Create 2025/4/17 14:17
 * @Version 1.0
 */
@SpringBootConfiguration
public class MyPageInterceptorConfig {

//    @Bean
//    public PageInterceptor pageInterceptor(){
//        PageInterceptor pageInterceptor = new PageInterceptor();
//        Properties properties = new Properties();
//        pageInterceptor.setProperties(properties);
//        //是否开启物理分页
//        properties.setProperty("reasonable","true");
//        return pageInterceptor;
//    }

    @Bean
    public PageHelper pageHelper(){
        return new PageHelper();
    }
}
